<style type="text/css">
	.addAd .has-error{
		border: 1px #f00 solid;
	}
	.addAd input{
		outline: none;
	}
	.addAd form input::-webkit-input-placeholder{
		color: #f00;
		font-size: 10px;
	}
</style>
<div class="contents">
	<table class="table table-striped table-hover">
		<thead>
			<tr>
				<th width="40%">SFA</th>
				<th width="40%">壹财富</th>
				<th width="20%">操作<a class="btn btn-success" href="#/varietyProduct/samePro?type={{type}}" style="float: right;padding: 0 11px;font-size: 12px">返回列表</a></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="form-inline">产品名称：{{info.pName}}</td>
				<td>
					产品名称：
					<a href="{{detail.productUrl}}" target="_black">{{detail.pName}}</a>
				</td>
				<td class="optd" rowspan="5">
					<a href="javascript:;" ng-click="markDiff(detail.bindId)">标记为不同产品</a>
				</td>
		</tr>
		<tr>
			<td class="form-inline">
				<!-- 返佣率: -->
				<table class="table table-bordered ">
					<thead>
						<tr>
							<th width="120">开始金额</th>
							<th width="120">结束金额</th>
							<th width="60">预期收益</th>
							<th width="60">返佣比例</th>
							<th width="30">操作</th>

						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="revenue in projectAnnualRevenue" ng-click="edit($index)">
							<td>
								<input style="width: 100%" ng-model='revenue.pStartAmount'>{{revenue.pStartAmount | moneyRender}}</td>
							<td>
								<input style="width: 100%" ng-model='revenue.pEndAmount'>{{revenue.pEndAmount | moneyRender}}</td>
							<td>
								<input style="width: 100%" ng-model='revenue.pAnnualRevenueExpect'>{{revenue.pAnnualRevenueExpect }}</td>
							<td>
								<input style="width: 100%" ng-model='projectRabateList[$index].pRabateProfit'>{{projectRabateList[$index].pRabateProfit | profitRender }}</td>
							<td><a href="javascript:;" ng-click="deleteItem($index)">删除</a></td>
						</tr>
					</tbody>
				</table>
				<button ng-click="showAdd()">新增</button>
				<div class="addAd" ng-repeat="tr in addInfo">
					<ng-form name="form" role="form">
						<div style="display: inline-block;width: 100px">
							<input type="text" style="width: 100%" class="nokong"  placeholder="起始金额" ng-class="{'has-error': form.pStartAmount.$invalid }" ng-model='tr.pStartAmount' name="pStartAmount" required="required">
							<span>{{tr.pStartAmount | moneyRender}}</span>
						</div>
						<div style="display: inline-block;width: 100px">
							<input type="text" style="width: 100%"  class="nokong" placeholder="结束金额" ng-class="{'has-error':form.pEndAmount.$invalid }" ng-model='tr.pEndAmount' class="has-error" name="pEndAmount" required="required">
							<span>{{tr.pEndAmount | moneyRender}}</span>
						</div>
						<div style="display: inline-block;width: 89px">
							<input type="text" style="width: 100%" class="nokong" placeholder="预期收益(%必填)" ng-class="{'has-error':form.pAnnualRevenueExpect.$invalid }" ng-model='tr.pAnnualRevenueExpect' class="has-error" name="pAnnualRevenueExpect" required="required">
							<span>{{tr.pAnnualRevenueExpect || '-'}}</span>
						</div>
						<div style="display: inline-block;width: 89px">
							<input type="text" style="width: 100%" class="nokong" placeholder="返佣比例" ng-class="{'has-error':form.pRabateProfit.$invalid }" ng-model='tr.pRabateProfit' class="has-error" name="pRabateProfit" required="required">
							<span >{{tr.pRabateProfit | profitRender}}</span>
						</div>
						<button ng-click="infoDelete($index)">取消</button>
					</ng-form>
				</div>
			</td>
			<td>
				<div style="width: 100%;display: inline-block;vertical-align: text-top;">
					<table class="table table-bordered" ng-bind-html="detail.productAnnual"></table>
				</div>
			</td>
		</tr>
		<tr>
			<td>
				募集说明：
				<textarea class="form-control" ng-model='info.pRecruitmentSummary'></textarea>
			</td>
			<td>
				<span style="color: #f00">募集进度</span>
				：{{detail.pRecruitmentSummary}}
			</td>
		</tr>
		<tr>
			<td class="form-inline">起售时间：{{info.pSaleTimeStart | date:'yyyy-MM-dd'}}</td>
			<td>本期起售日期：{{detail.pSaleTimeStart}}</td>
		</tr>
		<tr>
			<td class="form-inline">销售状态：{{info.pSaleStatus | productSaleStatusRender}}</td>
			<td><span style="color: #f00">产品状态</span>：{{detail.pSaleStatus}}</td>
		</tr>
		<tr>
			<td colspan="3" class="text-right"><button class="btn btn-success" ng-click="save()">保 存</button></td>
		</tr>
	</tbody>
	</table>
</div>